#define _CRT_SECURE_NO_WARNINGS 1

#include "string.h"

void Test01()
{
	MyString::string s1("hello world");
	cout << s1.c_str() << endl;
	
	for (auto& ch : s1)
	{
		ch += 1;
		cout << ch << " ";
	}
	cout << endl;

	s1[0] = 'o';
	for (size_t i = 0; i < s1.size(); i++)
	{
		cout << s1[i] << " ";
	}
	cout << endl;

	MyString::string::iterator it1 = s1.begin();
	while (it1 != s1.end())
	{
		cout << *it1 << " ";
		++it1;
	}
	cout << endl;

	/*s1.push_back('p');
	cout << s1.c_str() << endl;*/
	
}

void Test02()
{
	MyString::string s1("hello world");
	cout << s1.c_str() << endl;
	s1 += 'o';
	//s1 += "hello man";
	cout << s1.c_str() << endl;
}

int main()
{
	/*Test01();
	Test02();*/
	return 0;
}